<template>
  <div>
    登录页面
    <el-button @click="logout">退出登录</el-button>
  </div>
</template>

<script setup>
import {userStore} from "../stores/user.js";
import {ElMessage} from "element-plus";
import {useRouter} from 'vue-router'
const router = useRouter()
const store = userStore()
const logout = ()=>{
  //从store清空token
  store.removeToken()
  //返回到login页面
  router.push('/login')
}
</script>

<style scoped>

</style>